import { $get, $post, $put, $del } from 'utils/request'
// 个人消息中心记录列表
export let webmsgListApi = async (params) => {
  let url = `/$zmsg/v1/$tenantId/web-msg-center`
  let data = await $get(url, params)
  return data
}
// 删除个人消息中心消息记录
export let webmsgdeleApi = async (params) => {
  let url = `/$zmsg/v1/$tenantId/web-msg-center`
  let data = await $del(url, params)
  return data
}
// 个人消息中心全部阅读
export let webmsgAllReadApi = async (params) => {
  let url = `/$zmsg/v1/$tenantId/web-msg-center/all-read`
  let data = await $put(url, params)
  return data
}
// 个人消息中心标记已读
export let webmsgHaveReadApi = async (params) => {
  let url = `/$zmsg/v1/$tenantId/web-msg-center/have-read`
  let data = await $put(url, params)
  return data
}
// 用户消息浮窗消息集合获取
export let getWebMsgIconListApi = async (params) => {
  let url = `$zmsg/v1/$tenantId/web-msg-center/floating-windows`
  let data = await $get(url, {})
  return data
}
// 租户个人消息中心详情
export let webmsgIdApi = async (messageId, params) => {
  let url = `$zmsg/v1/$tenantId/web-msg-center/${messageId}`
  let data = await $get(url, params)
  return data
}
